IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_DomainGetBySiteId]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_DomainGetBySiteId]
GO
create procedure [dbo].[cms_sp_DomainGetBySiteId]
@SiteId int
as
select 
	[DomainId] as Id,
	[SiteId],
	[Hostname],
	[CreatedBy],
	[DateCreated],
	[LastUpdatedBy],
	[DateLastUpdated]
from [dbo].[Domains] 
where [SiteId] = @SiteId

GO

